package zhuoer.adv2;

import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;

public class DataInput {

	public static void main(String[] args) {
		try {
			// System.out.println(Integer.toHexString(10000));
			// OutputStream out = new FileOutputStream("e:/a/44.txt");
			// out.write(10000);
			// out.close();
			DataOutputStream dout = new DataOutputStream(new FileOutputStream(
					"e:/a/44.txt"));
			// 写入基本类型
			dout.writeInt(10000);
			dout.writeDouble(Math.PI * 184984);
			dout.writeBoolean(2 > 1);
			dout.writeBoolean(3 < 2);
			dout.writeByte(11);
			dout.close();
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

	}

}
